using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter37
{
	/// <summary>
	/// Example02: Separating Double-Slit Fringes of Two Wavelengths
	/// A light source emits visible light of two wavelengths:   
	/// \lambda = 430 nm and \lambda^{\prime} = 510 nm. 
	/// The source is used in a double-slit interference 
	/// experiment in which L = 1.50 m and d = 0.0250 mm. find the 
	/// separation distance between the third-order bright fringes.
	/// </summary>
	public class Example02
	{
		public Example02()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Optics obj = new L.Optics();
			obj.DistanceOfSlitSeperation = 0.025E-3;
			obj.DistanceToScreen = 1.5;
			obj.OrderNumber = 3;
			obj.WaveLength = 430.0E-9;
			obj.FindFringeInYoungExperiment();
			result+=Convert.ToString(obj.DistanceOfFringe)+"\r\n";
				obj.WaveLength = 510.0E-9;
			obj.FindFringeInYoungExperiment();
			result+=Convert.ToString(obj.DistanceOfFringe)+"\r\n";
		}
	}
}
